package com.zr.task.service.impl;

import java.util.List;

import com.zr.task.domain.EimTaskLog;
import com.zr.task.mapper.EimTaskCommandScheduleMapper;
import com.zr.task.mapper.EimTaskLogMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zr.task.mapper.EimTaskTranshipmentMapper;
import com.zr.task.domain.EimTaskTranshipment;
import com.zr.task.service.IEimTaskTranshipmentService;

import javax.annotation.Resource;

/**
 * 转运任务单Service业务层处理
 * 
 * @author zhaojunqi
 * @date 2022-10-21
 */
@Service
public class EimTaskTranshipmentServiceImpl implements IEimTaskTranshipmentService 
{
    @Resource
    private EimTaskTranshipmentMapper eimTaskTranshipmentMapper;

    @Resource
    private EimTaskCommandScheduleMapper eimTaskCommandScheduleMapper;

    @Resource
    private EimTaskLogMapper eimTaskLogMapper;
    /**
     * 查询转运任务单
     * 
     * @param id 转运任务单主键
     * @return 转运任务单
     */
    @Override
    public EimTaskTranshipment selectEimTaskTranshipmentById(Long id)
    {
        return eimTaskTranshipmentMapper.selectEimTaskTranshipmentById(id);
    }

    /**
     * 查询转运任务单列表
     * 
     * @param eimTaskTranshipment 转运任务单
     * @return 转运任务单
     */
    @Override
    public List<EimTaskTranshipment> selectEimTaskTranshipmentList(EimTaskTranshipment eimTaskTranshipment)
    {
        return eimTaskTranshipmentMapper.selectEimTaskTranshipmentList(eimTaskTranshipment);
    }

    /**
     * 新增转运任务单
     * 
     * @param eimTaskTranshipment 转运任务单
     * @return 结果
     */
    @Override
    public int insertEimTaskTranshipment(EimTaskTranshipment eimTaskTranshipment)
    {
        return eimTaskTranshipmentMapper.insertEimTaskTranshipment(eimTaskTranshipment);
    }

    /**
     * 修改转运任务单
     * 
     * @param eimTaskTranshipment 转运任务单
     * @return 结果
     */
    @Override
    public int updateEimTaskTranshipment(EimTaskTranshipment eimTaskTranshipment)
    {
        return eimTaskTranshipmentMapper.updateEimTaskTranshipment(eimTaskTranshipment);
    }

    /**
     * 批量删除转运任务单
     * 
     * @param ids 需要删除的转运任务单主键
     * @return 结果
     */
    @Override
    public int deleteEimTaskTranshipmentByIds(Long[] ids)
    {
        return eimTaskTranshipmentMapper.deleteEimTaskTranshipmentByIds(ids);
    }

    /**
     * 删除转运任务单信息
     * 
     * @param id 转运任务单主键
     * @return 结果
     */
    @Override
    public int deleteEimTaskTranshipmentById(Long id)
    {
        return eimTaskTranshipmentMapper.deleteEimTaskTranshipmentById(id);
    }

    @Override
    public int updateEimTaskTranshipmentById(EimTaskTranshipment eimTaskTranshipment) {
        return eimTaskTranshipmentMapper.updateEimTaskTranshipmentById(eimTaskTranshipment);
    }

    @Override
    public int updateEimTaskCommandSchedule(String id) {
        return eimTaskCommandScheduleMapper.updateEimCommandScheduleById(id);
    }

    @Override
    public int addTaskTranshipmentLog(EimTaskLog eimTaskLog) {
        return eimTaskLogMapper.insertEimTaskLog(eimTaskLog);
    }


}
